package sessions;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import entities.Amministratore;

@Stateless
public class AmministratoreManager implements AmministratoreManagerRemote {
	@PersistenceContext(unitName = "SwimDB")
	EntityManager database;


	public void createAmministratore(){
		Amministratore a=Amministratore.getMioSingolo();
		if(database.find(Amministratore.class, a.getID())==null){
			database.persist(a);
		}
	}
}
